package com.weiyi.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

@WebListener
public class OnlineUserCounter implements HttpSessionListener{
	private static int count;
	
	public static int getCount() {
		return count;
	}

	@Override
	public void sessionCreated(HttpSessionEvent arg0) {
		OnlineUserCounter.count++;
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent arg0) {
		OnlineUserCounter.count--;
	}
	
	
	
	
}
